import { http } from '@/utils/request'

// 用户相关接口
export const userApi = {
  // 登录
  login: (data) => {
    return http.post('/user/login', data)
  },
  putwarningNum: (data) => {
    return http.put('/userInfo/warning', data)
  },
  // 生成激活码
  generateActivationCode: () => {
    return http.post('/activation/generate')
  },

  // 获取激活码列表
  getActivationCodes: (params) => {
    return http.get('/activation/codes', params)
  },

  // 激活系统
  activate: (code) => {
    return http.post('/activation/activate', { code })
  }
}